import axios from '../http/htttp.js'
import qs from 'qs'
// 运费模板管理
// 列表
export function Freighlist () {
  return axios({
    method: 'get',
    params: {
      _gp: 'admin.freight',
      _mt: 'getAllFreightTemplate'
    }
  })
}
// 增加修改
export function Freighaddupdate (data) {
  return axios({
    method: 'post',
    data: qs.stringify({
      _gp: 'admin.freight',
      _mt: data._mt,
      ...data
    })
  })
}
// sup树
export function FreighSpous () {
  return axios({
    method: 'get',
    params: {
      _gp: 'admin.goods',
      _mt: 'getSpuBigTree'
    }
  })
}
// 状态
export function FreighStatus (data) {
  return axios({
    method: 'post',
    params: {
      _gp: 'admin.goods',
      _mt: 'freezeOrActivation',
      ...data
    }
  })
}
// 删除
export function Freighdel (id) {
  return axios({
    method: 'post',
    data: qs.stringify({
      _gp: 'admin.freight',
      _mt: 'deleteFreightTemplate',
      templateId: id
    })
  })
}
